import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser';
import { uglify } from "rollup-plugin-uglify";
import obfuscator from 'rollup-plugin-obfuscator';

export default {
  input: 'src/index.ts',
  external: ['three/examples/jsm/loaders/ifc/web-ifc-api.js'],
  output: {
    file: 'dist/bcs_three.bundle.js',
    format: 'esm',
    entryFileNames: '[name].esm.js',
  },
  plugins: [
    typescript({ tsconfig: './tsconfig.json' }),
    terser(),
    uglify(), 
    obfuscator()
  ]
};